package com.atguigu.lease.common.utils;

import java.util.Random;

/**
 * ClassName: VerifyCodeUtil
 * Package: com.atguigu.lease.common.utils
 * Description:
 *
 * @Author 咚咚小圆帽
 * @Create 2025/2/23 17:26
 * @Version 1.0
 */
public class VerifyCodeUtil {

    public static String getVerifyCode(int length){
        StringBuilder stringBuilder = new StringBuilder();
        Random random = new Random();
        for (int i = 0; i < length; i++) {
            stringBuilder.append(random.nextInt(10));
        }
        return stringBuilder.toString();
    }

}
